package com.LachesismStorm.lachesism.core.common.enums;

import com.LachesismStorm.lachesism.core.common.system.IErrorCode;

/**
 * 功能描述
 *
 * @author: LACHESISM
 * @date: 2023年03月11日 18:32
 */
public enum ResponseCodeEnum implements IErrorCode {

    SUCCESS(200, "操作成功"),
    NO_DATA(204, "没有相关内容"),
    FAILED(500, "操作失败"),
    DATA_REPEAT(501, "数据重复"),
    VALIDATE_FAILED(206, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    CAPTCHA_ERR(402, "验证码错误"),
    FORBIDDEN(403, "没有相关权限"),
    NOTFOUND(406, "用户不存在"),
    FORMATFAILED(407, "格式不正确"),
    REQUEST_BUZZ(408, "请求频繁,已限流"),
    PW_ERROR(410, "密码错误"),
    FILE_REPEAT(410, "文件重复"),
    NOT_ELIGIBLE(442, "没有相关资格");




    private long code;
    private String message;

    ResponseCodeEnum(long code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public long getCode() {
        return code;
    }


    @Override
    public String getMessage() {
        return message;
    }

}
